home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / disd.doc < prev    next >
Text File  |  1995-03-31  |  3KB  |  89 lines

  1.         SATURN Disassembler for the HP-48SX   Version 1.0 
  2.         by Kevin Pryor, with improvements by John Gilbert 
  3.             [plus two utilities by Dave Marsh] 
  4.  
  5. DISD is an HP-48 directory that contains a SATURN disassembler and its many 
  6. subroutines.  The programs are written in RPL with the exception of Dave 
  7. Kaffine's PEEK which is written in machine code.  The entire directory is 
  8. 11K and has 56 files.  The Information on the SATURN chip comes solely from 
  9. Alonzo Gariepy's HP-28S Processor Notes and uses his mnemonics.  I have not 
  10. extensively tested these programs.  These programs are in the public 
  11. domain.  Feel free to improve these programs in any way. 
  12.  
  13. Instructions: 
  14.  
  15. Change your I/O setup menu on your HP48 to binary, and wire. 
  16. Send DISD to your HP48.  In the DISD directory the useful programs are: 
  17.  
  18. DISR:    Disassembles memory at #address and following addresses. 
  19.     Uses ADDR to store the next address, ODMP stores the unused 
  20.     hex string for the next instruction.  
  21.            
  22.     #address -> address:ASM 
  23.     address:ASM -> address2:ASM 
  24.  
  25. Example: 
  26.  
  27.     #0 DISR  
  28.         0: "MOVE.1 3,P" 
  29.     DISR 
  30.         2: "JUMP.3 1BC" 
  31.  
  32. DISJ    Disassembles memory at the last jump or branch instruction 
  33.     used by DISR or itself, the variable ADRJ.  
  34.  
  35. Example: 
  36.  
  37. ( after above example ) 
  38.  
  39.     DISJ 
  40.         1BC: "JUMP.A 01FC6" 
  41.     DISJ 
  42.         1FC6: "CLRB 6,ST" 
  43.     DISR      
  44.         1FC9: "CLRB 2,ST" 
  45.  
  46. DIS    Disassembles a string of hex digits. 
  47.  
  48.     "hex digits" -> ASM 
  49.             "remaining hex digits" 
  50.  
  51. Example: 
  52.  
  53. "D9D2421" DIS 
  54.         "MOVE.A B,C" 
  55.         "D2421" 
  56.     DIS       
  57.         "MOVE.A B,C" 
  58.         "CLR.A C" 
  59.         "421" 
  60.     DIS      
  61.         "MOVE.A B,C" 
  62.         "CLR.A C" 
  63.         "BRCS PC+13" 
  64.  
  65.     [To automate DIS, see CDIS below.  -jkh-] 
  66.  
  67. PKS    Peek at address and put in form needed by DIS  
  68.  
  69.         #address -> "peek string" 
  70.  
  71.     #0 PKS 
  72.         "2369B108DADF1008" 
  73.  
  74. --- End of DISD documentation by Kevin Pryor --- 
  75.  
  76. [Note: Dave Marsh wrote the following two little routines.  Place them in 
  77.  the DISD directory if you wish; they're useful if you do a lot of "batch" 
  78.  disassembling rather than just one instruction at a time.  -jkh-] 
  79.  
  80. CDIS -- Complete Disassembler.  Simply loops DIS through a whole hex string. 
  81.  
  82. \<< DO DIS UNTIL DUP "" SAME END DROP \>> 
  83.  
  84. FLE --    Connects strings on the stack (as after CDIS) with linefeeds. 
  85.     This makes it easier to save a disassembly into a single variable, 
  86.     ship it to a PC, and examine it on a real screen. 
  87.  
  88. \<< 3 DEPTH START "\010" SWAP + + NEXT \>> 
  89.